<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
    <head><meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'><meta name='description' content='quick note 命令行的艺术 编码 所有参数都应该在接收处就需要处理好默认值(针对每个模块而言，因为单个模块可能随时被拆开来用) 所有 golang 中的结构体只要有可能处'>
<title>Quick Note</title>

<link rel='canonical' href='/p/quick-note/'>

<link rel="stylesheet" href="/scss/style.min.56b4b4efdee21dd7cd9a6ec6cdb1882f71985765df9c7591a90716c58b48f4c5.css"><meta property='og:title' content='Quick Note'>
<meta property='og:description' content='quick note 命令行的艺术 编码 所有参数都应该在接收处就需要处理好默认值(针对每个模块而言，因为单个模块可能随时被拆开来用) 所有 golang 中的结构体只要有可能处'>
<meta property='og:url' content='/p/quick-note/'>
<meta property='og:site_name' content='良宏'>
<meta property='og:type' content='article'><meta property='article:section' content='Post' /><meta property='article:published_time' content='2021-12-24T00:00:00&#43;00:00'/><meta property='article:modified_time' content='2022-03-23T12:47:18&#43;00:00'/>
<meta name="twitter:title" content="Quick Note">
<meta name="twitter:description" content="quick note 命令行的艺术 编码 所有参数都应该在接收处就需要处理好默认值(针对每个模块而言，因为单个模块可能随时被拆开来用) 所有 golang 中的结构体只要有可能处">
    </head>
    <body class="
    article-page
    ">
    <script>
        (function() {
            const colorSchemeKey = 'StackColorScheme';
            if(!localStorage.getItem(colorSchemeKey)){
                localStorage.setItem(colorSchemeKey, "auto");
            }
        })();
    </script><script>
    (function() {
        const colorSchemeKey = 'StackColorScheme';
        const colorSchemeItem = localStorage.getItem(colorSchemeKey);
        const supportDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches === true;

        if (colorSchemeItem == 'dark' || colorSchemeItem === 'auto' && supportDarkMode) {
            

            document.documentElement.dataset.scheme = 'dark';
        } else {
            document.documentElement.dataset.scheme = 'light';
        }
    })();
</script>
<div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky ">
    <button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="切换菜单">
        <span class="hamburger-box">
            <span class="hamburger-inner"></span>
        </span>
    </button>

    <header>
        
            
            <figure class="site-avatar">
                <a href="/">
                
                    
                    
                    
                        
                        <img src="/img/wx_150x150_hub08581134c092243b209205c3073808c_6075_300x0_resize_q75_box.jpeg" width="300"
                            height="300" class="site-logo" loading="lazy" alt="Avatar">
                    
                
                </a>
                
                    <span class="emoji">🍥</span>
                
            </figure>
            
        
        
        <div class="site-meta">
            <h1 class="site-name"><a href="/">良宏</a></h1>
            <h2 class="site-description">好好学习，天天向上。</h2>
        </div>
    </header><ol class="menu" id="main-menu">
        
        
        
        <li >
            <a href='/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <polyline points="5 12 3 12 12 3 21 12 19 12" />
  <path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
  <path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" />
</svg>



                
                <span>Home</span>
            </a>
        </li>
        
        
        <li >
            <a href='/about/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="12" cy="7" r="4" />
  <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
</svg>



                
                <span>About</span>
            </a>
        </li>
        
        
        <li >
            <a href='/archives/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-archive" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <rect x="3" y="4" width="18" height="4" rx="2" />
  <path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10" />
  <line x1="10" y1="12" x2="14" y2="12" />
</svg>



                
                <span>Archives</span>
            </a>
        </li>
        
        
        <li >
            <a href='/search/' >
                
                
                
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="10" cy="10" r="7" />
  <line x1="21" y1="21" x2="15" y2="15" />
</svg>



                
                <span>Search</span>
            </a>
        </li>
        

        <div class="menu-bottom-section">
            
            
                <li id="dark-mode-toggle">
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="8" cy="12" r="2" />
  <rect x="2" y="6" width="20" height="12" rx="6" />
</svg>



                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="16" cy="12" r="2" />
  <rect x="2" y="6" width="20" height="12" rx="6" />
</svg>



                    <span>暗色模式</span>
                </li>
            
        </div>
    </ol>
</aside>

    

            <main class="main full-width">
    <article class="main-article">
    <header class="article-header">

    <div class="article-details">
    

    <div class="article-title-wrapper">
        <h2 class="article-title">
            <a href="/p/quick-note/">Quick Note</a>
        </h2>
    
        
    </div>

    
    
    
    
    <footer class="article-time">
        
            <div>
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calendar-time" width="56" height="56" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <path d="M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4" />
  <circle cx="18" cy="18" r="4" />
  <path d="M15 3v4" />
  <path d="M7 3v4" />
  <path d="M3 11h16" />
  <path d="M18 16.496v1.504l1 1" />
</svg>
                <time class="article-time--published">Dec 24, 2021</time>
            </div>
        

        
            <div>
                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="12" cy="12" r="9" />
  <polyline points="12 7 12 12 15 15" />
</svg>



                <time class="article-time--reading">
                    阅读时长: 4 分钟
                </time>
            </div>
        
    </footer>
    

    
</div>

</header>

    <section class="article-content">
    
    
    <blockquote>
<p>quick note</p>
</blockquote>
<p><a class="link" href="https://github.com/jlevy/the-art-of-command-line/blob/master/README-zh.md"  target="_blank" rel="noopener"
    >命令行的艺术</a></p>
<h1 id="编码">编码</h1>
<ul>
<li>所有参数都应该在接收处就需要处理好默认值(针对每个模块而言，因为单个模块可能随时被拆开来用)</li>
<li>所有 golang 中的结构体只要有可能处理成 json 都需要 注意 <code>json:&quot;page&quot;</code> 避免首字母大写</li>
</ul>
<h1 id="docker-command">Docker Command</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker rm <span class="k">$(</span>docker ps -q -f <span class="nv">status</span><span class="o">=</span>exited<span class="k">)</span> <span class="c1"># 移除所有退出的容器</span>
</span></span><span class="line"><span class="cl">docker rmi -f <span class="k">$(</span>docker images <span class="p">|</span> grep <span class="s2">&#34;^&lt;none&gt;&#34;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $3}&#39;</span><span class="k">)</span> <span class="c1"># 移除所有 &lt;none&gt; 的镜像</span>
</span></span><span class="line"><span class="cl">docker rmi -f <span class="k">$(</span>docker images <span class="p">|</span> grep <span class="s1">&#39;search_term_here&#39;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $1}&#39;</span><span class="k">)</span> <span class="c1"># 比如 `2 days ago`</span>
</span></span><span class="line"><span class="cl">docker volume rm <span class="k">$(</span>docker volume ls -qf <span class="nv">dangling</span><span class="o">=</span><span class="nb">true</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">docker network rm <span class="k">$(</span>docker network ls -q<span class="k">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">docker save -o nginx.tar nginx:latest <span class="c1"># 导出镜像 会保存该镜像的所有历史记录(commit)</span>
</span></span><span class="line"><span class="cl">docker save &gt; nginx.tar nginx:latest <span class="c1"># 导出镜像 会保存该镜像的所有历史记录(commit)</span>
</span></span><span class="line"><span class="cl">docker load -i nginx.tar <span class="c1"># 导入镜像，包含元数据,tag等</span>
</span></span><span class="line"><span class="cl">docker load &lt; nginx.tar <span class="c1"># 导入镜像，包含元数据,tag等</span>
</span></span><span class="line"><span class="cl">docker <span class="nb">export</span> -o nginx-test.tar nginx-test <span class="c1"># 导出容器，不会包含历史记录(commit)</span>
</span></span><span class="line"><span class="cl">docker import nginx-test.tar nginx:imp <span class="c1"># 导入为镜像, 可以指定新镜像名</span>
</span></span><span class="line"><span class="cl">cat nginx-test.tar <span class="p">|</span> docker import - nginx:imp <span class="c1"># 导入为镜像，可以指定新镜像名</span>
</span></span></code></pre></div><h1 id="discuz-打印出-mysql-查询语句">Discuz 打印出 mysql 查询语句</h1>
<p>在 <code>discuz_database</code> 类中的 <code>public static function query</code> 方法
<code>self::checkquery($sql);</code> 在这后面加上 <code>writelog(&quot;sqllog&quot;,$sql);</code> 即可看到所有 SQL</p>
<h1 id="docker-的-alpine-快速安装-sqlite">Docker 的 alpine 快速安装 sqlite</h1>
<p><code>sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories &amp;&amp; apk update &amp;&amp; apk add sqlite</code></p>
<h1 id="快速-sqlite-查询">快速 sqlite 查询</h1>
<pre tabindex="0"><code>sqlite3 /usr/src/app/config/database.db 
.databases // 查询出所有数据库
.show      // 列出所有数据库信息
.tables    // 列出所有表
select * from user;
.exit
</code></pre><h1 id="下载在线文档到本地">下载在线文档到本地</h1>
<p><code>wget -r -p -k -nc -o www.shouce.ren.log www.shouce.ren</code></p>
<h1 id="递归查找包含指定字符忽略大小写的所有-markdown-文件并显示行号">递归查找包含指定字符(忽略大小写)的所有 markdown 文件并显示行号</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">grep -in <span class="s2">&#34;searchWord&#34;</span> *.md
</span></span><span class="line"><span class="cl">grep -rin <span class="s2">&#34;searchWord&#34;</span> --include <span class="s2">&#34;*.md&#34;</span> .
</span></span><span class="line"><span class="cl">grep --color -rni XGetWindowAttributes
</span></span></code></pre></div><h1 id="pdf-体积太大裁剪">pdf 体积太大裁剪</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pdftk ./linux内核编程.pdf cat 1-70 output linux内核编程.上.pdf
</span></span></code></pre></div><h1 id="指定目录下的字符串批量替换">指定目录下的字符串批量替换</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sed -i <span class="s2">&#34;s/oldstring/newstring/g&#34;</span> grep oldstring -rl path
</span></span><span class="line"><span class="cl">sed -i <span class="s2">&#34;s/要查找的文本/替换后的文本/g&#34;</span> <span class="sb">`</span>grep -rl <span class="s2">&#34;要查找的文本&#34;</span> /任意目录<span class="sb">`</span>
</span></span></code></pre></div><h1 id="显示当前目录下所有文件夹大小从小到大排序">显示当前目录下所有文件夹大小,从小到大排序</h1>
<p><code>du -sh * | sort -n</code></p>
<h1 id="新增用户及快速配置">新增用户及快速配置</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo useradd -s /bin/bash -m lianghong -G sudo,docker,netdev,users
</span></span><span class="line"><span class="cl"> -u <span class="m">1500</span>
</span></span><span class="line"><span class="cl"> -s /bin/bash /usr/bin/zsh
</span></span><span class="line"><span class="cl">sudo password lianghong
</span></span><span class="line"><span class="cl"><span class="c1"># sudo usermod -aG sudo,docker,netdev,users lianghong</span>
</span></span><span class="line"><span class="cl">sudo userdel -r lianghong
</span></span></code></pre></div><h1 id="临时-x11vnc-服务">临时 x11vnc 服务</h1>
<p><a class="link" href="https://wiki.archlinux.org/title/X11vnc_%28"  target="_blank" rel="noopener"
    >https://wiki.archlinux.org/title/X11vnc_(</a>简体中文)</p>
<pre tabindex="0"><code>x11vnc -display :0
x11vnc -auth /var/lib/lightdm/.Xauthority -display :0 -forever
x11vnc -display :0 -autho /home/USER/.Xauthority
x11vnc -display :0 -auth /var/lib/gdm/:0.Xauth
x11vnc -wait 50 -noxdamage -passwd PASSWORD -display :0 -forever -o /var/log/x11vnc.log -bg
x11vnc -usepw # 设置密码
x11vnc -find

❯ ps -aux | grep auth # 留意 Xvfb
root      251969  0.0  0.4 843784 68392 tty7     Ssl+ 3月14   3:49 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{7f719f8e-fea0-4375-9e08-f62c4f00b5d9} -background none -noreset -displayfd 18 -seat seat0 vt7
root      251984  0.0  0.0  61868 15236 ?        S    3月14   0:00 /usr/lib/x86_64-linux-gnu/sddm/sddm-helper --socket /tmp/sddm-auth94af223c-bed9-4d33-bf86-4da3b2e94382 --id 8 --start /usr/bin/sddm-greeter --socket /tmp/sddm-:0-hQxQPR --theme /usr/share/sddm/themes/debian-theme --user sddm --greeter
chenlia+  337277  0.8  1.6 1380336 266304 ?      Sl   14:46   0:28 Xvfb :20 -auth /home/chenlianghong/.Xauthority -nolisten tcp -noreset -screen 0 3840x2560x24
chenlia+  337306  0.0  0.4 17231584 77216 ?      Sl   14:46   0:00 /opt/google/chrome-remote-desktop/chrome-remote-desktop-host --host-config=- --audio-pipe-name=/home/chenlianghong/.config/chrome-remote-desktop/pulseaudio#b60643d23f/fifo_output --server-supports-exact-resize --ssh-auth-sockname=/tmp/chromoting.chenlianghong.ssh_auth_sock --signal-parent
chenlia+  337693  0.0  0.1 192556 16944 ?        Sl   14:54   0:00 /usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1
chenlia+  339403  0.8  0.2  56452 34264 pts/5    S+   15:08   0:16 x11vnc -auth /home/chenlianghong/.Xauthority -display :20 -forever
chenlia+  340041  0.0  0.0   9392   728 pts/0    S+   15:41   0:00 grep --color=auto auth
</code></pre><h1 id="日志输出">日志输出</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./test.sh &gt; log.txt 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="c1"># 将 ./test.sh 的输出重定向到 log.txt 中，同事将标准错误也重定向到 log.txt 文件中</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 类型	                   文件描述符	默认情况	            对应文件句柄位置</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 标准输入（standard input）	0	      从键盘获得输入	       /proc/self/fd/0</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 标准输出（standard output）	1	      输出到屏幕（即控制台）	/proc/self/fd/1</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 错误输出（error output）	  2	      输出到屏幕（即控制台）	/proc/self/fd/2</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 命令	                   介绍</span>
</span></span><span class="line"><span class="cl"><span class="c1"># command &lt;filename	  以filename文件作为标准输入</span>
</span></span><span class="line"><span class="cl"><span class="c1"># command 0&lt;filename	同上</span>
</span></span><span class="line"><span class="cl"><span class="c1"># command &lt;&lt;delimiter	从标准输入中读入，直到遇到delimiter分隔符</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">nohup java -jar xxxx.jar &gt;/dev/null 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">&amp;</span> <span class="c1"># &gt;/dev/null 2&gt;&amp;1命令来丢弃所有的输出</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">./test.sh <span class="p">&amp;</span>&gt; log.txt
</span></span><span class="line"><span class="cl"><span class="c1"># &amp;&gt; file 和 &gt;&amp; file 意思是把标准输出和标准错误输出都重定向到文件file中</span>
</span></span></code></pre></div><h1 id="ssh临时跳转使用">ssh临时跳转使用</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">scp -J user@host.com:2222 1.js user@192.168.1.68:~ <span class="c1"># 临时拷贝文件</span>
</span></span><span class="line"><span class="cl">ssh -J user@host.com:2222 -X user@192.168.1.68 <span class="c1"># 临时连接(withX11)</span>
</span></span></code></pre></div><h1 id="ssh临时授权">ssh临时授权</h1>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 解决部分网络下需要对虚拟机(无桌面)进行网络扫码授权的问题</span>
</span></span><span class="line"><span class="cl">ssh -D <span class="m">1080</span> user@192.168.1.68
</span></span><span class="line"><span class="cl"><span class="c1"># 然后在浏览器中使用插件连接上本地 socks5 的 1080 端口，即可进行网络访问扫码授权的操作了。</span>
</span></span></code></pre></div><h1 id="how-to-push-all">How to push all?</h1>
<p>case 1:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git remote add gitee git@gitee.com:clh21/vim.git
</span></span><span class="line"><span class="cl">git remote remove gitee
</span></span><span class="line"><span class="cl">git remote add all git@gitee.com:clh21/vim.git
</span></span><span class="line"><span class="cl">git remote set-url --add all git@github.com:clh021/vim.git
</span></span><span class="line"><span class="cl">git push all --all
</span></span><span class="line"><span class="cl">git fetch --all
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Tip: To no need typing all whenever you send a commit, just use &#34;origin&#34; instead of &#34;all&#34;:</span>
</span></span><span class="line"><span class="cl">git remote set-url --add origin nodester-host:path/proj.git
</span></span></code></pre></div><p>case 2:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># To push all branches to all remotes:</span>
</span></span><span class="line"><span class="cl">git remote <span class="p">|</span> xargs -L1 git push --all
</span></span><span class="line"><span class="cl"><span class="c1"># To push a specific branch to all remotes</span>
</span></span><span class="line"><span class="cl">git remote <span class="p">|</span> xargs -L1 -I R git push R master
</span></span><span class="line"><span class="cl"><span class="c1"># To make a git alias for the command</span>
</span></span><span class="line"><span class="cl">git config --global alias.pushall <span class="s1">&#39;!git remote | xargs -L1 git push --all&#39;</span>
</span></span></code></pre></div><h1 id="md5sum">Md5sum</h1>
<pre tabindex="0"><code>$ md5sum file1 file2 file3 &gt; mysum
$ md5sum --check mysum
file1: OK
file2: OK
file3: OK
</code></pre><h1 id="study">study</h1>
<pre tabindex="0"><code>pkg-config --cflags --libs gtk+-3.0
pkg-config --cflags --libs wayland-protocols
cmake --build build
cd /usr/include/aarch64-linux-gnu/
cd /usr/lib/aarch64-linux-gnu/pkgconfig/
ls |grep wayland
dpkg -L wayland-protocols
cd /usr/share/pkgconfig/
cd /usr
find -name wayland-protocols.pc
vim ./local/share/pkgconfig/wayland-protocols.pc
cd local/share
ls
cd pkgconfig/
ls
sudo rm wayland-protocols.pc
dpkg -l |grep gtk
dpkg -L libgtk-3-dev
vim /usr/lib/aarch64-linux-gnu/pkgconfig/gtk+-3.0.pc
pkg-config --cflags --libs gtk+-3.0
dpkg -l |grep
aptitude search wayland-protocols
dpkg -l |grep wayland-protocols
apt-cache search wayland-protocols
apt-cache policy wayland-protocols
pkg-config --cflags --libs wayland-protocols
pkg-config --cflags --libs wayland-client
cmake -B build .
ls
cmake -G Ninja -B build
ls build
ninja -C build
cmake -G Ninja -B build
ls
cd build
ls
cmake --build .
</code></pre><h2 id="查看一个正在运行的命令细节">查看一个正在运行的命令细节</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pgrep -fa lithium
</span></span></code></pre></div><h2 id="查看文件名或路径中包含了-download-的">查看文件名或路径中包含了 download 的</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">fdfind download <span class="p">|</span> grep idl
</span></span></code></pre></div>
</section>


    <footer class="article-footer">
    

    <section class="article-lastmod">
        <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-clock" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z"/>
  <circle cx="12" cy="12" r="9" />
  <polyline points="12 7 12 12 15 15" />
</svg>



        <span>
            最后更新于 Mar 23, 2022 12:47 UTC
        </span>
    </section></footer>


    
</article>

    

    

     
    
        
    

    <footer class="site-footer">
    <section class="copyright">
        &copy; 
        
            2021 - 
        
        2023 良宏
    </section>
    <section class="powerby">
        Built with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a>,
        主题 <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="3.5.0">Stack</a></b> 由 <a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a> 设计
    </section>
</footer>


    
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    
    <div class="pswp__bg"></div>

    
    <div class="pswp__scroll-wrap">

        
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                
                
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div><script 
                src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"integrity="sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo="crossorigin="anonymous"
                defer
                >
            </script><script 
                src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"integrity="sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU="crossorigin="anonymous"
                defer
                >
            </script><link 
                rel="stylesheet" 
                href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css"crossorigin="anonymous"
            ><link 
                rel="stylesheet" 
                href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"crossorigin="anonymous"
            >

            </main>
        </div>
        <script 
                src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js"integrity="sha256-awcR2jno4kI5X0zL8ex0vi2z&#43;KMkF24hUW8WePSA9HM="crossorigin="anonymous"
                
                >
            </script><script type="text/javascript" src="/ts/main.js" defer></script><script type="text/javascript" src="/ts/custom.js" defer></script>
<script>
    (function () {
        const customFont = document.createElement('link');
        customFont.href = "https://fonts.font.im/css2?family=Lato:wght@300;400;700&display=swap";

        customFont.type = "text/css";
        customFont.rel = "stylesheet";

        
    }());
</script>


    </body>
</html>
